package intellitrends.activities;

import java.util.ArrayList;

import intellitrends.adaptors.EatOutAdaptor;
import intellitrends.data.EatOutData;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListView;

public class MemberPageActivity extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.memberpage);
	    // TODO Auto-generated method stub
	    this.InitializedComponents();
	}

	private void InitializedComponents(){
		try{
			ArrayList<EatOutData> alData = new ArrayList<EatOutData>();
			alData.add(new EatOutData(1, "Cafe Zouk", "Italian", "Gulberg", 10, 0, 0));
			alData.add(new EatOutData(2, "Pizza Hut", "Italian", "DHA", 20, 0, 0));
			alData.add(new EatOutData(3, "McDonald's", "Fast Food", "M.M.Alaam Rd", 30, 0, 0));
			alData.add(new EatOutData(4, "KFC", "Fast Food", "Johar Town", 40, 0, 0));
			alData.add(new EatOutData(5, "Ze Grill", "Traditional", "Wapda Town", 50, 0, 0));
			alData.add(new EatOutData(6, "Paradise", "Turkish", "Liberty round about", 50, 0, 0));
			
			//ArrayAdapter<EatOutData> aaEatouts = new ArrayAdapter<EatOutData>(this,R.layout.eatoutrow,alData);
			EatOutAdaptor aaEatOuts = new EatOutAdaptor(this, R.layout.eatoutrow,alData);
			ListView lst = (ListView)findViewById(R.id.lvItems);
			lst.setAdapter(aaEatOuts);
		}catch(Exception ex){
			Log.e("EXP", ex.getMessage() + "\n" + ex.getStackTrace());
		}
	}
}
